package com.cictec.middleware.distribute.send.apollo;

import java.util.Map;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.cic.camel.components.stomp.StompComponent;
import com.cictec.middleware.commons.utils.PMSUtils;


/**
 * 车辆数据总线apollo推送 处理器
 * @author ql
 *
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
@Component
public class ReceiverFromStompProcessor implements Processor {

	
	private static Logger logger = LoggerFactory.getLogger(ReceiverFromStompProcessor.class);


	@Override
	public void process(Exchange exchange) throws Exception {

		String jsonBody = (String) exchange.getIn().getBody();
		
		Map<String, Object> body = JSON.parseObject(jsonBody, Map.class);
		
		System.out.println("从apollo接受到消息：" + JSON.toJSONString(body));
		

	}

	
}
